<?php

if (file_exists(APP_COMMON . "config.php")) {
    $runtimeConfig = include_once APP_COMMON . "config.php";
} else {
    $runtimeConfig = [];
}

switch (APP_PREFIX) {
    case 'simpleboot3':
        $runtimeConfig['template']['taglib_build_in'] = 'cmf\lib\taglib\Cmf,cx,www\portal\taglib\Portal';
        break;
    default:
        $app_configs=[];
        break;
}
$runtimeConfig=array_merge($runtimeConfig,$app_configs);
$configs = [
    // +----------------------------------------------------------------------
    // | 应用设置
    // +----------------------------------------------------------------------
    // 应用命名空间
    'app_namespace' => 'www',
    // +----------------------------------------------------------------------
    // | 模块设置
    // +----------------------------------------------------------------------
    // 默认模块名
    'default_module'          => 'portal',
    // 默认控制器名
    'default_controller'      => 'Index',
    // 默认操作名
    'default_action'          => 'index',
    // +----------------------------------------------------------------------
    // | URL设置
    // +----------------------------------------------------------------------
    // +----------------------------------------------------------------------
    // | 模板设置
    // +----------------------------------------------------------------------
    //分页配置
    'paginate'                => [
        'type'      => '\www\portal\paginator\Bootstraps',
        'var_page'  => 'page',
        'list_rows' => 15,
    ],
    // +----------------------------------------------------------------------
    // | 异常及错误设置
    // +----------------------------------------------------------------------
    // +----------------------------------------------------------------------
    // | 日志设置
    // +----------------------------------------------------------------------
    // +----------------------------------------------------------------------
    // | Trace设置 开启 app_trace 后 有效
    // +----------------------------------------------------------------------
    // +----------------------------------------------------------------------
    // | 会话设置
    // +----------------------------------------------------------------------
    // +----------------------------------------------------------------------
    // | Cookie设置
    // +----------------------------------------------------------------------
    // +----------------------------------------------------------------------
    // | 数据库设置
    // +----------------------------------------------------------------------
    // +----------------------------------------------------------------------
    // | CMF 设置
    // +----------------------------------------------------------------------
    // +----------------------------------------------------------------------
    // | 自定义 设置
    // +----------------------------------------------------------------------

     'boot_path'          => '/index.php?s=portal/index/index',
     'default_root'=>'index/index/index',
];
$configs=array_merge($runtimeConfig,$configs);

if (file_exists(CMF_ROOT . "data/conf/config.php")) {
    $runtimeConfig = include_once CMF_ROOT . "data/conf/config.php";
} else {
    $runtimeConfig = [];
}

return array_merge($configs, $runtimeConfig);
